<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <title>添加主题--管理后台</title>
    <link th:href="@{/css/admin.css}" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="main">
    <div th:replace="admin/common :: #top"></div>
    <div th:replace="admin/common :: #opt_list"></div>
    <div id="opt_area">
        <ul class="classlist">
            <li th:each="news:${page.content}">
                <label th:text="${news.ntitle}"></label>
                <font>作者：</font>
                <b th:text="${news.nauthor}">&#160;&#160;&#160;&#160;</b>
                <span><a th:href='@{/news/toupdate(nid=${news.nid})}'>修改</a> &#160;&#160;&#160;&#160;
					<a href='javascript:;' class="delnews" th:id="${news.nid}" >删除</a>
                </span>
            </li>

        </ul>
        <p align="right">
            当前页数:[<span th:text="${page.number+1}" ]></span>/<span th:text="${page.totalPages}"></span>]
            <a th:href="@{/news/list(pageNo=1)}">首页</a>
            <a th:if="${page.hasPrevious()}" th:href="@{/news/list(pageNo=${page.number})}">上一页</a>
            <a th:if="${page.hasNext()}" th:href="@{/news/list(pageNo=${page.number+2})}">下一页</a>
            <a th:href="@{/news/list(pageNo=${page.totalPages})}">末页</a>

    </div>

    <div th:replace="admin/common :: #footerbar"></div>
</div>
<script th:src="@{/js/jquery-1.8.3.min.js}"></script>
<script type="text/javascript">

    $(function () {
        $(".delnews").click(function () {
            if (confirm("确定要删除吗？")) {
                location.href = "/news/delete?nid=" + $(this).attr("id");
            }
        })
    })

</script>


</body>
</html>

	